package org.qqcui.designpattern.patterns.chain;

/**
 * 审批抽象类
 *
 * @author cuiqingqiang
 * @version 1.0
 * @date 2022/5/7 17:01
 **/
public abstract class Approver {

    /**
     * 下一个审批者
     */
    protected Approver nextApprover;

    /**
     * 审批者名称
     */
    protected String name;

    public Approver(String name) {
        this.name = name;
    }

    public void setNextApprover(Approver nextApprover) {
        this.nextApprover = nextApprover;
    }

    /**
     * 审批逻辑抽象接口
     * @param request
     */
    public abstract void processRequest(PurchaseRequest request);
}
